from gen import generate_random
from alg import Solution


def run_test():
    # 随机生成孩子们的成绩
    ratings = generate_random()
    print(f"随机生成的成绩: {ratings}")

    # 创建解决方案实例并计算糖果数
    solution = Solution()
    total_candies = solution.candy(ratings)

    # 输出结果
    print(f"需要分配的糖果总数: {total_candies}")


if __name__ == "__main__":
    run_test()